/* 
 * correlation.h
 * Created on August 5, 2005; 5:15 PM
 * by vramadurai
 */
#ifndef _CORRELATION_H_
#define _CORRELATION_H_

#include "HsTypes.h"


hs_uint32_t correlation(
                    hs_int16_t * restrict psSyncBufI,
                    hs_int16_t * restrict psSyncBufQ,
                    hs_int16_t * restrict psUpSampBarkerSeq,
                    hs_int32_t * siReadPtr
                );


void wlan_do_buffer_for_correlation(
                                struct HS_Phy11bStr  *HS_Phy11bPtrTh,                                
                                hs_int16_t  * restrict psSyncBufI,
                                hs_int16_t  * restrict psSyncBufQ,                                
                                ePHYSTATES_TH *ePhyState
                              );

void incr_corr_buffer_ptr(
                            struct HS_Phy11bStr  *HS_Phy11bPtrTh,                           
                            hs_int16_t  * restrict piEndPtrI,
                            hs_int16_t  * restrict piStartPtrI,
                            hs_int16_t  * restrict piStartPtrQ
                         );

void do_correlation_th1(
                        struct HS_Phy11bStr  *HS_Phy11bPtrTh, 
                        hs_int16_t  * restrict psUpSampBarkerSeq,
                        hs_int16_t  * restrict psSyncBufI,
                        hs_int16_t  * restrict psSyncBufQ,                      
                        ePHYSTATES_TH *ePhyState
                    );

void correlation_th1(
                        struct HS_Phy11bStr  *HS_Phy11bPtrTh, 
                        hs_int16_t  * restrict psUpSampBarkerSeq,
                        hs_int16_t  * restrict psSyncBufI,
                        hs_int16_t  * restrict psSyncBufQ, 
                        ePHYSTATES_TH *ePhyState
                    );

void do_correlation_th2(
                        struct HS_Phy11bStr  *HS_Phy11bPtrTh, 
                        hs_int16_t  * restrict psUpSampBarkerSeq,
                        hs_int16_t  * restrict psSyncBufI,
                        hs_int16_t  * restrict psSyncBufQ,                        
                        ePHYSTATES_TH *ePhyState
                    );

void correlation_th2(
                        struct HS_Phy11bStr  *HS_Phy11bPtrTh, 
                        hs_int16_t  * restrict psUpSampBarkerSeq,
                        hs_int16_t  * restrict psSyncBufI,
                        hs_int16_t  * restrict psSyncBufQ,                       
                        ePHYSTATES_TH *ePhyState
                    );
#endif
